<?php
defined('BASEPATH') or exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html lang="en">

<head>
	<!--加载header文件-->
	<?php
	include_once 'public/views/header.php';
	include_once 'public/home/html/laydate.php';
	include_once 'public/home/html/alert.php';
	?>
	<?php
	include_once 'public/home/html/faltSelect.php';
	?>
	<link rel="stylesheet" href="public/css/edit.css" />
	<script src="cust/js/tableEdit1.js"></script>
	<script src="public/js/cus_modal.js"></script>
	<script src="public/js/autoTextarea.js"></script>
	<script src="public/home/js/function.js"></script>
	<style>
		input {
			width: 150px;
		}
	</style>

</head>

<body>
	<div class="container">
		<div class="row">
			<input type="hidden" id="modal_title" value="<?= $title ?>" />
			<input type="hidden" id="modal_height" value="450" />
			<h3 class="title-page"><?= $title ?></h3>
			<form id="editForm">
				<input type="hidden" id="id" name="id" value="<?= estr($detail, 'id') ?>" />
				<input type="hidden" id="folder_id" name="folder_id" value="<?php echo $folder_id; ?>" />
				<table class='edit_table'>
					<tr>
						<th class="required">调查题目</th>
						<td colspan="3">
							<input class="edit-page" type="text" name="title" id="title" value="<?= estr($detail, 'title') ?>" dataType="*" />
							<div class="print-page"><?= estr($detail, 'title') ?></div>
						</td>
					</tr>
					<tr>
						<th class="required" colspan="4" style="height:30px;">调查内容（或情况）</td>
					</tr>
					<tr>
						<td colspan="4" style="height:200px;">
							<textarea class="outline-none" name="content" id="content" style="height:100%; width:100%; resize: none;"><?= estr($detail, 'content') ?></textarea>
						</td>
					</tr>
					<tr>
						<th class="required" colspan="4" style="height:30px;">意见或建议</td>
					</tr>
					<tr>
						<td colspan="4" style="height:200px;">
							<textarea class="outline-none" name="advice" id="advice" style="height:100%; width:100%; resize: none;"><?= estr($detail, 'advice') ?></textarea>
						</td>
					</tr>
					<tr>
						<th class="required">调查人</th>
						<td>
							<?php if (estr($detail, 'id')) : ?>
								<?= estr($detail, 'username') ?>（<?= estr($detail, 'usercode') ?>）
							<?php else : ?>
								<?php echo getSess()['username'] ?>（<?= getSess()['usercode'] ?>）
							<?php endif ?>
						</td>
						<th class="required">时间</th>
						<td>
							<input type="text" class="outline-none" name="sub_time" id="sub_time" value="<?php echo isset($detail['sub_time']) ? date('Y-m-d', estr($detail, 'sub_time')) : '' ?>" dataType="*" />
						</td>
					</tr>
					<tr>
						<th class="required">督导身份</th>
						<td colspan="4">
							<select class="outline-none" name="AttendType" id="AttendType">
								<option value="-1">督导身份</option>
								<?php foreach ($AttendType as $k => $v) : ?>
									<option value="<?= $v['key'] ?>" <?php if (estr($detail, 'AttendType') == $v['key']) echo 'selected="selected"' ?>><?php echo $v['value'] ?></option>
								<?php endforeach ?>
							</select>
						</td>
					</tr>
				</table>
			</form>
			<div class="viewContent">
				<!--这是显示具体车辆信息情况的。-->
			</div>
		</div>
	</div>
</body>

</html>